package com.xyz.app.controller;

import com.free.common.vo.ResultModel;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalDefultExceptionHandler {

    @ExceptionHandler(RuntimeException.class)
    public ResultModel handleRuntimeException(RuntimeException ex){
        return ResultModel.failure(ex.getMessage());
    }

}
